package com.saatcioglu.android.sarkiyigoster;

import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.widget.TextView;

public class SarkiyiGoster extends Activity {
	public static final String ARTIST = "ARTIST";
	public static final String SONG = "SONG";

	public static final String SHARED_PREFERENCE = "com.saatcioglu.android.muzikdinler.pref";
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
	@Override
	protected void onResume() {
		SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFERENCE, Context.MODE_PRIVATE);
        if(sharedPreferences != null){
    		String artist = sharedPreferences.getString(ARTIST, "");
    		String song = sharedPreferences.getString(SONG, "");
           	((TextView) findViewById(R.id.TextViewArtist)).setText(artist);
        	((TextView) findViewById(R.id.TextViewSong)).setText(song);
        }
		super.onResume();
	}
	
}